package com.ycher.hellokotlin.first

/**
 * 子类
 * 如果父类的参数在主构造函数，继承子类构造函数需传参
 */
class Student1(val sno: String, val grade: Int, name: String, age: Int) :
    Person1(name, age) {

    init {
        println("sno is " + sno)
        println("grade is " + grade)
    }

    // 次构造函数
    constructor(name: String, age: Int) : this("", 0, name, age)

    constructor() : this("", 0)


}